/***************************************************************************                            *
 *Author: Achilles Zhang												   *
 *Date: 2012.03.28														   *
 *File Name: StatisticsDialog.h										   *
 *Description: The file is used to declare the GUI of caculating area.	       *
 ***************************************************************************/
#ifndef STATISTICSDIALOG_H
#define STATISTICSDIALOG_H

#include <QWidget>
#include <QColorDialog>
#include <QMap>
#include "ui_StatisticsDialog.h"

class StaticsDialog : public QWidget
{
	Q_OBJECT

public:
	StaticsDialog(QWidget *parent = 0);
	virtual ~StaticsDialog();

	void setResultLabel(float);
	void setAreaLabel(float);
	void setSpotLabel(int);
	void setSpotAreaLabel(float);
	void addComboItem(char *, int, int);
	void clearComboItem();
	void caculateArea(char* , float);
	void showResult();

public Q_SLOTS:
	void closePushed();
	void refreshPushed();
	void comboIndexChanged(int);
	void toolButtonClicked();
	void caculateClicked();

private:
	Ui::staticsDialog ui;
	QMap<QString, float> areaMap;
	int faceCount[1024];
	bool isChecked;
};

#endif //STATISTICSDIALOG_H